/*=================================================
    File:	zcom_uiIMMemoryStart.c

	Module:	ui
	Author:	wqn	

=================================================*/

#include <zcom_uiIMMain.h>
#include <IMManager.h>
#include <ui.h>
#include <spr.h>

void zcom_uiIMMemoryStart(void * arg)
{
    UIMenuText title;
    memset(&title, 0, sizeof(title));

    title.textIdx = LANG_Menu_IM_MEMORY;
    title.textCB = NULL;	
    title.textCBarg = NULL; 

    char str[48] = {};
    char str_inbox[24] = {};
    //char str_outbox[24] = {};
    char str_draftbox[24] = {};
    sprcpy(str_inbox, sizeof(str_inbox),langGet(LANG_Menu_IM_INBOX));
    //sprcpy(str_outbox, sizeof(str_outbox),langGet(LANG_Menu_IM_OUTBOX));
    sprcpy(str_draftbox, sizeof(str_draftbox),langGet(LANG_Menu_IM_DRAFT));

    int used_inbox, total_inbox;
    //int used_outbox, total_outbox;
    int used_draftbox, total_draftbox;
    if(IM_InBox_GetSize(&used_inbox, &total_inbox)
	//&& IM_OutBox_GetSize(&used_outbox, &total_outbox))
	&& IM_DraftBox_GetSize(&used_draftbox, &total_draftbox))
    {
        //spr(str, sizeof(str), "%s: \t%d/%d\r", str_inbox, used, total);
        spr(str, sizeof(str), 
		"%s: %d/%d    %s: %d/%d", 
		str_inbox, used_inbox, total_inbox,
		//str_outbox, used_outbox, total_outbox
		str_draftbox, used_draftbox, total_draftbox
		);
	
        uiMenuDialogMesgOk(title, str);
    }
    return;

    /*
    int used, total;
    if(IM_InBox_GetSize(&used, &total))
    {
	char str[30];
	spr(str, 30, "Inbox: %d/%d", used, total);
	uiMenuDialogMesgTimed(
		LANG_Zcom_Profile_Personalise_Tone_setting_Message,
		str);
    }
    */
}

